package com.erik.lin.redis;

import com.erik.lin.util.AppContext;
import org.springframework.data.redis.core.RedisTemplate;

/**
 * Created by Erik on 2017/4/5.
 */
public class RedisSender {

    public static void send(String channel, Object data) {
        RedisTemplate redisTemplate = (RedisTemplate) AppContext.getBean("redisTemplate");
        redisTemplate.convertAndSend(channel, data);
    }
}
